<!-- 库存详情 -->
<template>
    <div class="page has-navbar stockDetail" @click.stop="dialogBtn=true;">
        <div class="page-content" @click.stop="searchArr=[]">
            <div class="tab-change-wrap">
                <div class="change-tab">
                    <div @click.stop="changeModeType">
                        <span>商品</span>
                        <span class="tab"><i :class="modeType=='PRODUCT'?'':'other'"></i></span>
                        <span>原料</span>
                    </div>
                </div>
                <div class="change-tab">
                    <div @click.stop="changeTab">
                        <span>出库</span>
                        <span class="tab"><i :class="nowTab=='out'?'':'other'"></i></span>
                        <span>入库</span>
                    </div>
                </div>
            </div>
            
            <div class="bar bar-header item-input-inset">
                <label class="item-input-wrapper"><i class="icon ion-ios-search placeholder-icon"></i>
                    <!-- <form action="javascript:;" @submit="onSearch" id="von-search-8xz"> -->
                    <input type="search" placeholder="输入名称" v-model="keywords">
                    <!-- </form> -->
                </label>
                <button type="button" class="button button-clear button-positive" @click="onCancel">取消</button>
            </div>
            <template v-if="modeType == 'PRODUCT'">
                <div class="listTitle clearfix" style="text-align:center;" >
                    <div style="width:30%;text-align:left;" class="left">商品名称</div>
                    <div style="width:20%" class="left">商品库存</div>
                    <div style="width:15%" class="left">规格</div>
                    <div style="width:20%" class="left">{{nowTab=='out'?'出库件数':'入库件数'}}</div>
                    <div style="width:15%" class="left">操作</div>
                    <div class="ser-list" v-if="searchArr.length" @click.stop="">
                        <ul>
                        <li v-for="(item,index) in searchArr" :key="index" v-text="item.name" @click="getSearchItem(item)"></li>
                        </ul>
                    </div>
                </div>
                <scroll>
                    <div style="text-align:center;" v-if="nowTab=='out'">
                        <list class="list-ios">
                            <item v-for="(item,ind) in homeArr" :key="ind" class="listItem">
                                <div style="width:30%;text-align:left;" v-text="item.name" class="left"></div>
                                <div style="width:20%" v-text="item.quantity" class="left"></div>
                                <div style="width:15%" v-text="item.capacity" class="left"></div>
                                <div style="width:20%" class="left inp">
                                    <input type="text" v-model="item.whole"  maxlength="4"/>
                                </div>
                                <div style="width:15%;color:blue;" class="left"  @click="del(item,ind)">删除</div>
                            </item>
                        </list>
                    </div>
                    <div style="text-align:center;" v-if="nowTab=='in'">
                        <list class="list-ios">
                            <item v-for="(item,ind) in homeArr" :key="ind" class="listItem">
                                <div style="width:30%;text-align:left;" v-text="item.name" class="left"></div>
                                <div style="width:20%" v-text="item.quantity" class="left"></div>
                                <div style="width:15%" class="left" @click.stop="showStandard(ind,item)"><span style="display:inline-block;"><i class="iconfont icon-jiantou"></i>{{item.capacity}}</span></div>
                                <div style="width:20%" class="left inp">
                                    <input type="text" v-model="item.whole"  maxlength="4"/>
                                </div>
                                <div style="width:15%;color:blue;" class="left"  @click="del(item,ind)">删除</div>
                            </item>
                        </list>
                    </div>
                </scroll>
            </template>
            <!--  -->
            <template v-if="modeType == 'MATERIAL'">
                <div class="listTitle clearfix" style="text-align:center;" >
                    <div style="width:25%;text-align:left;" class="left">原料名称</div>
                    <div style="width:20%" class="left">库存</div>
                    <div style="width:10%" class="left">单位</div>
                    <div style="width:10%" class="left">规格</div>
                    <div style="width:20%" class="left">{{nowTab=='out'?'出库数':'入库数'}}</div>
                    <div style="width:15%" class="left">操作</div>
                    <div class="ser-list" v-if="searchArr.length" @click.stop="">
                        <ul>
                        <li v-for="(item,index) in searchArr" :key="index" v-text="item.name" @click="getSearchItem(item)"></li>
                        </ul>
                    </div>
                </div>
                <scroll>
                    <div style="text-align:center;" v-if="nowTab=='out'">
                        <list class="list-ios">
                            <item v-for="(item,ind) in homeArr" :key="ind" class="listItem">
                                <div style="width:25%;text-align:left;" v-text="item.name" class="left"></div>
                                <div style="width:20%" v-text="item.quantity" class="left"></div>
                                <div style="width:10%" v-text="item.unitName" class="left"></div>
                                <div style="width:10%" v-text="item.capacity" class="left"></div>
                                <div style="width:20%" class="left inp">
                                    <input type="text" v-model="item.whole"  maxlength="4"/>
                                </div>
                                <div style="width:15%;color:blue;" class="left"  @click="del(item,ind)">删除</div>
                            </item>
                        </list>
                    </div>
                    <div style="text-align:center;" v-if="nowTab=='in'">
                        <list class="list-ios">
                            <item v-for="(item,ind) in homeArr" :key="ind" class="listItem">
                                <div style="width:25%;text-align:left;" v-text="item.name" class="left"></div>
                                <div style="width:20%" v-text="item.quantity" class="left"></div>
                                <div style="width:10%" v-text="item.unitName" class="left"></div>
                                <div style="width:10%" class="left" @click.stop="showStandard(ind,item)"><span style="display:inline-block;"><i class="iconfont icon-jiantou"></i>{{item.capacity}}</span></div>
                                <div style="width:20%" class="left inp">
                                    <input type="text" v-model="item.whole"  maxlength="4"/>
                                </div>
                                <div style="width:15%;color:blue;" class="left"  @click="del(item,ind)">删除</div>
                            </item>
                        </list>
                    </div>
                </scroll>
            </template>
            <div class="confirm">
                <button @click="willUp">下一步</button>
            </div>
        </div>
        <div class="mask" v-if="dialogBtn">
            <div class="alert-tab">
                <div class="tit">
                    {{nowTab=='in'?'入库':'出库'}}商品共{{billData.kind}}种
                </div>
                <div class="next-item">
                    <span class="tit-span">总额:</span>
                    <span class="tit-cont">
                        <input type="text" v-model="billData.totalAmount" placeholder="总金额,选填" />
                    </span>
                </div>
                <div class="next-item">
                    <span class="tit-span">原因:</span>
                    <span class="tit-cont">
                        <select name="" id="" v-model="billData.typeValue" v-if="nowTab=='out'">
                            <option :value="im.value" v-for="(im,ix) in typeOptions" :key="ix">{{im.label}}</option>
                        </select>
                        <select name="" id="" v-model="billData.typeValue" v-if="nowTab=='in'">
                            <option :value="im.value" v-for="(im,ix) in typeOptionsIn" :key="ix">{{im.label}}</option>
                        </select>
                    </span>
                </div>
                <div class="next-item">
                    <span class="tit-span">备注:</span>
                    <span class="tit-cont">
                        <input type="text" v-model="billData.notes" placeholder="选填" />
                    </span>
                </div>
                <div class="btn">
                    <span @click.stop="dialogBtn=false">取消</span>
                    <span class="sure" @click.stop="stockUp">确定</span>
                </div>
            </div>
        </div>
        <div class="standard-mask" v-if="doShowStandard" @click.stop="doShowStandard=false">
            <div class="standard-wrap">
                <ul>
                    <li @click.stop="showNowStandard(capacityItem)" v-for="(capacityItem,capacityIndex) in capacityArr" :key="capacityIndex">
                        <span class="standard-count">{{capacityItem.capacity}}</span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</template>

<script type="text/javascript">
import {INV_URL} from "./../../../../urlConfig/index";
export default{
    props: ['storeId'],
	data () {
		return {
            modeType:"PRODUCT",
            dialogBtn:false,
            typeOptionsIn: [
                // {value: 'CHECK_IN',label: '盘点入库'},
                // {value: 'REFUND_IN',label: '退单入库'},
                { value: "PURCHASE_IN", label: "采购入库" },
                { value: "ALLOCATION_IN", label: "调拨入库" },
                { value: "INNER_IN", label: "吧台退回" }
            ],
            typeOptions: [
				// {value: 'SALES_OUT',label: '销售出库'},
				{value: 'INNER_OUT',label: '仓库至吧台'},
				{value: 'REFUND_OUT',label: '退货出库'},
				{value: 'ALLOCATION_OUT',label: '店铺调拨'},
		    ],
            stockList: [],
            searchList: [],
            keywords: '',
            searching: false,
            nowTab:"out",
            homeArr:[],//列表
            searchArr:[],//搜索的商品列表
            billData:{
	        	typeValue: 'INNER_OUT',
	        	notes:'',
	        	totalAmount:'',//用户手动输入的总金额
	        	imgUrl:'',
	        	printNum:1,
	        	kind:0,
	        	isPrint:false
            },
            preventBtn:true,
            capacityArr: [], //规格列表
            doShowStandard:false,
		}
    },
    watch:{
        nowTab(val){
            this.homeArr = [];
            if(val=='out'){
                this.billData = {
                    typeValue: 'INNER_OUT',
                    notes:'',
                    totalAmount:'',//用户手动输入的总金额
                    imgUrl:'',
                    printNum:1,
                    kind:0,
                    isPrint:false
                }
            }else if(val=='in'){
                this.billData = {
                    typeValue: "PURCHASE_IN",
                    notes: "",
                    totalAmount: "",
                    imgUrl: "",
                    printNum: 1,
                    isPrint: false,
                    kind: 0
                };
            }
        },
	    keywords(val){
		   	this.searchArr = [];
		   	if(!val){
		   		return;
		   	}
		   	// 搜索
			this.$http({
				url:INV_URL+'search',
				method:'GET',
				params:{
					storeId:this.storeId,
					q:val,
                    mold:this.modeType
				}
			}).then(res=>{
				this.searchArr = res.data;
			});
	   },
       modeType(val){
           this.homeArr = [];
           if(val=='out'){
                this.billData = {
                    typeValue: 'INNER_OUT',
                    notes:'',
                    totalAmount:'',//用户手动输入的总金额
                    imgUrl:'',
                    printNum:1,
                    kind:0,
                    isPrint:false
                }
            }else if(val=='in'){
                this.billData = {
                    typeValue: "PURCHASE_IN",
                    notes: "",
                    totalAmount: "",
                    imgUrl: "",
                    printNum: 1,
                    isPrint: false,
                    kind: 0
                };
            }
       }
	},
    methods: {
        changeModeType(){
			this.modeType == "PRODUCT"?this.modeType="MATERIAL":this.modeType="PRODUCT";
		},
        // 
        // 改变当前商品规格
        showNowStandard(item) {
            this.$http({
                url: INV_URL+"get-invCa",
                method: "GET",
                params: {
                    invId: item.id,
                    cap: item.capacity
                }
            }).then(res => {
                this.homeArr.map((ele, index) => {
                    if (ele.productId === res.data.productId) {
                        res.data.isPrice = false;
                        res.data.whole = 0;
                        this.homeArr.splice(index, 1, res.data);
                    }
                });
                this.doShowStandard = false;
            });
        },
        // 是否显示规格
        showStandard(index, item) {
            this.getStandardList(item);
        },
         // 获取规格列表
        getStandardList(item) {
            this.$http({
                url: INV_URL+"find-capacity",
                method: "GET",
                params: {
                    productId: item.productId,
                    storeId: this.storeId
                }
            }).then(res => {
                this.capacityArr = res.data;
                this.doShowStandard = true;
            });
        },
        //删除某个商品
		del(item,ind){
            this.homeArr.splice(ind ,1);
		},
        changeTab(){
            this.nowTab=="out"?this.nowTab="in":this.nowTab="out";
        },
        // 获得列表
        getInventoryList: function () {
            // this.$http.get('inventories?storeId='+this.storeId).then((res)=>{
            //     this.stockList = res.data;
            // });

            this.$http.get('products/stores-search?storeId='+this.storeId+'&q='+encodeURI('')+'&stockEnabled=true').then((res)=>{
                // console.log(res.data)
                this.stockList = res.data;
            })
        },
        willUp(){
            if(this.nowTab=='out'){
                let kind = 0;
                if(this.homeArr.length==0){
                    $toast.show('请选择商品', 2000).then(() => {})
                    return;
                }else{
                    for (var i = 0; i < this.homeArr.length; i++) {
                        if(!/^\d+$/.test(this.homeArr[i].whole)){
                            $toast.show('请输入正确的  '+this.homeArr[i].name+'  商品件数', 2000).then(() => {})
                            return;
                        }
                        console.log(this.homeArr[i].whole);
                        if(this.homeArr[i].whole !== 0){
                            kind++;
                        }
                    };
                }
                this.dialogBtn = true;
                this.billData={typeValue: 'INNER_OUT',notes:'',totalAmount:'',imgUrl:'',printNum:1,isPrint:false,kind:kind};
            }else if(this.nowTab=='in'){
                // this.doShowAddInp();
                let kind = 0;
                if (this.homeArr.length == 0) {
                    $toast.show('请选择商品', 2000).then(() => {})
                    return;
                } else {
                    for (var i = 0; i < this.homeArr.length; i++) {
                    if (!/^\d+$/.test(this.homeArr[i].whole)) {
                        $toast.show('请输入正确的  '+this.homeArr[i].name+'  商品件数', 2000).then(() => {})
                        return;
                    }
                        if (this.homeArr[i].whole !== 0) {
                            kind++;
                        }
                    }
                }
                this.dialogBtn = true;
                this.billData = {
                    typeValue: "PURCHASE_IN",
                    notes: "",
                    totalAmount: "",
                    imgUrl: "",
                    printNum: 1,
                    isPrint: false,
                    kind: kind
                };
            }
			
	    },
        //根据id获取某个商品
	    getSearchItem(item){
	    	for (var i = 0; i < this.homeArr.length; i++) {
	    		if(this.homeArr[i].productId==item.id){
		    		$toast.show('请勿重复添加', 2000).then(() => {})
			        return;
	    		}
            };
            if(this.nowTab=="out"){
                this.$http({
                        url:INV_URL+'get-outProduct',
                        method:'GET',
                        params:{
                            id:item.id
                        }
                }).then(res=>{
                    let data  = res.data;
                    this.keywords = '';
                    for (var i = 0; i < data.length; i++) {
                        let obj = {
                            isPrice:false,//价格是否处于修改状态
                            id:data[i].id,
                            name:data[i].name,
                            productId:data[i].productId,
                            storeId:data[i].storeId,
                            capacity:data[i].capacity,//规格
                            purchasePrice:data[i].purchasePrice,//每件进价
                            quantity:data[i].quantity,//仓库库存,
                            unitName:data[i].unitName,//
                            whole:0
                        };
                        this.homeArr.push(obj);
                    }
                    this.total = res.data.totalElements;
                });
            }else if(this.nowTab=="in"){
                if(this.modeType == "PRODUCT"){
				    this.getProduct(item);
                }else{
                    this.getMaterial(item);
                }
            }
			
        },
        getMaterial(item, isNull = false) {
            if (isNull) {
                this.$http({
                url: INV_URL+"get/material",
                method: "GET",
                params: {
                    id: item.id,
                    bat: "",
                    index: ""
                }
                }).then(res => {
                this.keywords = "";
                console.log(res);
                if (res.data.status === "false") {
                    // 没有规格调出添加规格
                    // this.doShowFirst = true;
                    // this.$message({
                    //   showClose: true,
                    //   message: "当前商品无规格，请先添加规格",
                    //   type: "error"
                    // });
                    // console.log(this.doShowFirst);
                    if(this.isDel){
                    this.homeArr = [];
                    this.isDel = false;
                    }else{
                    this.doShowFirst = true;
                    $toast.show('当前商品无规格，请先添加规格', 2000).then(() => {})
                    console.log(this.doShowFirst);
                    }
                    return;
                }
                let data = res.data;

                this.homeArr = [];
                let obj = {
                    isPrice: false, //价格是否处于修改状态
                    id: data.id,
                    name: data.name,
                    productId: data.productId,
                    storeId: data.storeId,
                    capacity: data.capacity, //规格
                    purchasePrice: data.purchasePrice, //每件进价
                    quantity: data.quantity, //仓库库存,
                    unitName: data.unitName, //仓库库存,
                    whole: 0
                };
                this.homeArr.push(obj);
                // this.total = res.data.totalElements;
                });
            } else {
                this.$http({
                    url: INV_URL+"get/material",
                    method: "GET",
                    params: {
                        id: item.id,
                        bat: "",
                        index: ""
                    }
                    }).then(res => {
                    this.keywords = "";
                    console.log(res);
                    if (res.data.status === "false") {
                        // 没有规格调出添加规格
                        if(this.isDel){
                        this.homeArr = [];
                        this.isDel = false;
                        }else{
                        this.doShowFirst = true;
                        $toast.show('当前商品无规格，请先添加规格', 2000).then(() => {})
                        console.log(this.doShowFirst);
                        }
                        return;
                    }
                    let data = res.data;
                    let obj = {
                        isPrice: false, //价格是否处于修改状态
                        id: data.id,
                        name: data.name,
                        productId: data.productId,
                        storeId: data.storeId,
                        capacity: data.capacity, //规格
                        purchasePrice: data.purchasePrice, //每件进价
                        quantity: data.quantity, //仓库库存,
                        unitName: data.unitName, //仓库库存,
                        whole: 0
                    };
                    this.homeArr.push(obj);
                    });
                }
        },
        // isNull用来判断当前是否应该置空homeArr数组
    getProduct(item, isNull = false) {
      if (isNull) {
        this.$http({
          url: INV_URL+"get/product",
          method: "GET",
          params: {
            id: item.id,
            mold:this.modeType,
            bat: "",
            index: ""
          }
        }).then(res => {
          this.keywords = "";
          console.log(res);
          if (res.data.status === "false") {
            // 没有规格调出添加规格
            // this.doShowFirst = true;
            // this.$message({
            //   showClose: true,
            //   message: "当前商品无规格，请先添加规格",
            //   type: "error"
            // });
            // console.log(this.doShowFirst);
            if(this.isDel){
              this.homeArr = [];
              this.isDel = false;
            }else{
              this.doShowFirst = true;
		      $toast.show('当前商品无规格，请先添加规格', 2000).then(() => {})
              console.log(this.doShowFirst);
            }
            return;
          }
          let data = res.data;

          this.homeArr = [];
          let obj = {
            isPrice: false, //价格是否处于修改状态
            id: data.id,
            name: data.name,
            productId: data.productId,
            storeId: data.storeId,
            capacity: data.capacity, //规格
            purchasePrice: data.purchasePrice, //每件进价
            quantity: data.quantity, //仓库库存,
            whole: 0
          };
          this.homeArr.push(obj);
          // this.total = res.data.totalElements;
        });
      } else {
        this.$http({
            url: INV_URL+"get/product",
            method: "GET",
            params: {
                id: item.id,
                mold:this.modeType,
                bat: "",
                index: ""
            }
            }).then(res => {
            this.keywords = "";
            console.log(res);
            if (res.data.status === "false") {
                // 没有规格调出添加规格
                if(this.isDel){
                this.homeArr = [];
                this.isDel = false;
                }else{
                this.doShowFirst = true;
		        $toast.show('当前商品无规格，请先添加规格', 2000).then(() => {})
                console.log(this.doShowFirst);
                }
                return;
            }
            let data = res.data;
            let obj = {
                isPrice: false, //价格是否处于修改状态
                id: data.id,
                name: data.name,
                productId: data.productId,
                storeId: data.storeId,
                capacity: data.capacity, //规格
                purchasePrice: data.purchasePrice, //每件进价
                quantity: data.quantity, //仓库库存,
                whole: 0
            };
            this.homeArr.push(obj);
            });
        }
        },
        onSearch() {
            // this.$http.get('products/stores-search?storeId='+this.storeId+'&q='+encodeURI(this.keywords)+'&stockEnabled=true').then((res)=>{
            //     this.searchList = res.data;
            //     if ( this.searchList[0] ) {
            //         this.searching = true;
            //     } else {
            //         $toast.show('无相关结果', 2000).then(() => {})
            //     }

            //     document.getElementsByTagName('input')[0].blur();
            // }).catch(()=>{

            // })
            // 
            // 
            // new
            // new
        },
        //提交数据
	    stockUp(){
			if(this.billData.totalAmount!==''){
				if (!/^(0|[1-9][0-9]{0,9})(\.[0-9]{1,2})?$/.test(this.billData.totalAmount)) {
		    		$toast.show('总金额格式有误', 2000).then(() => {})
					return;
				}
				if(!/^\d{0,9}$/.test(parseFloat(this.billData.totalAmount)*100)){
		    		$toast.show('总金额格式有误', 2000).then(() => {})
					return;
            	};
			}

	    	if(!this.billData.typeValue){
		    	$toast.show('请选择原因', 2000).then(() => {})
		        return;
	    	}
	    	if ( !this.preventBtn ) {
                return;
            }
            this.preventBtn = false;
	    	// let body = {
	    	// 	single:0,
	    	// 	whole:0,
	    	// 	id:this.$uuid(),
	    	// 	storeId:this.storeId,
	    	// 	notes:this.billData.notes,
	    	// 	stockSource:this.billData.typeValue,
	    	// 	totalAmount:parseFloat(this.billData.totalAmount)*100,
	    	// 	bill:this.billData.imgUrl,
	    	// 	source:'WAREHOUSE',
	    	// 	inventores:[]
			// }
            // let store = JSON.parse(sessionStorage.getItem('store'));
            let empId = localStorage.getItem('empId');
            let empName = localStorage.getItem('empName');
			let body = {
	    		operatorId:empId,
				operatorName:empName,
	    		code:this.$uuid(),
	    		storeId:this.storeId,
	    		notes:this.billData.notes,
	    		stockSource:this.billData.typeValue,
				totalAmount:parseFloat(this.billData.totalAmount),
				countNum:0,
	    		inventores:[],
                mold:this.modeType
	    	}
	    	for (var i = 0; i < this.homeArr.length; i++) {
				if(this.homeArr[i].whole!==0){
					let newInventores = {
						invId:this.homeArr[i].id,
						productName:this.homeArr[i].name,
						quantity:this.homeArr[i].whole,
						capacity:this.homeArr[i].capacity,
						productId:this.homeArr[i].productId
					};
					body.countNum+=parseInt(this.homeArr[i].whole);
					body.inventores.push(newInventores);
				}
            }
            if(this.nowTab=="out"){
                this.$http.post(INV_URL+'stock-out',body).then((res)=>{
                    console.log(res);
                    if(res.data.code===400){
                        $toast.show(res.data.msg, 2000).then(() => {})
                        setTimeout(()=>{
                            this.preventBtn = true;
                        },1000)
                        return;
                    }else if(res.data.code===500){
                        $toast.show('系统错误', 2000).then(() => {})
                        setTimeout(()=>{
                            this.preventBtn = true;
                        },1000)
                        return;
                    }
                    $toast.show('出库成功', 2000).then(() => {})
                    // 打印暂时取消
                    // if(this.billData.isPrint){
                    // 	this.$posPrint(this.billData.printNum, document.getElementById("print").innerHTML);
                    // }
                    this.homeArr = [];
                    this.dialogBtn = false;
                    setTimeout(()=>{
                        this.preventBtn = true;
                    },1000)
                }).catch((err)=>{
                    setTimeout(()=>{
                        this.preventBtn = true;
                    },1000)
                })
            }else if(this.nowTab=="in"){
                this.$http
                    .post(INV_URL+"stock-in", body)
                    .then(res => {
                    console.log(res);
                    if (res.data.code === 200) {
                        $toast.show('操作成功', 2000).then(() => {})
                    } else if (res.data.code === 400) {
                        $toast.show(res.data.msg, 2000).then(() => {})
                        setTimeout(() => {
                        this.preventBtn = true;
                        }, 1000);
                        return;
                    } else if (res.data.code === 500) {
                        $toast.show("系统错误", 2000).then(() => {})
                        setTimeout(() => {
                        this.preventBtn = true;
                        }, 1000);
                        return;
                    }
                    this.homeArr = [];
                    this.dialogBtn = false;
                    setTimeout(() => {
                            this.preventBtn = true;
                        }, 1000);
                    })
                    .catch(err => {
                        setTimeout(() => {
                            this.preventBtn = true;
                        }, 1000);
                    });
            }
	    	
	    },
        onCancel() {
            // this.searching = false;
            this.keywords = '';
		   	this.searchArr = [];

        }
    },
    created(){
        // this.getInventoryList();
    },
    updated() {
       $("input").blur(function(){
            console.log('失去焦点')
            window.scrollTo(0,0);
        }); 
    },
    mounted(){
        document.title = "仓库出入库";
        console.log($("input"));
        $("input").blur(function(){
            console.log('失去焦点')
            window.scrollTo(0,0);
        });
        /*document.getElementsByTagName('input')[0].onblur = ()=>{
            this.onSearch();
        }*/
    }
}
</script>
<style lang="scss" scoped>
	@import "stockUpDown";
</style>
